import win32gui, win32com.client,win32con

def find_window(win_name:str):
    return win32gui.FindWindow(None,win_name)

def active_window(win:int,max_size=True):
    print('Active Window:',win)
    shell = win32com.client.Dispatch("WScript.Shell")
    shell.SendKeys('%')
    size=win32con.SW_MAXIMIZE if max_size else win32con.SW_NORMAL
    win32gui.ShowWindow(win, size)
    win32gui.SetForegroundWindow(win)

def active_potplayer():
    win=find_window('PotPlayer')
    active_window(win)

if __name__ == '__main__':
    active_potplayer()
    # active_window(5912)